#!/bin/bash

echo "Comando: insert, remove, search"
read comand

~/trabalho-2/bin/client localhost client_x-men_${comand}.out < ~/trabalho-2/input/x-men_${comand}.txt > /dev/null &
ssh ciclope "~/trabalho-2/bin/client x-men client_ciclope_${comand}.out < ~/trabalho-2/input/ciclope_${comand}.txt > /dev/null" &
ssh wolverine "~/trabalho-2/bin/client x-men client_wolverine_${comand}.out < ~/trabalho-2/input/wolverine_${comand}.txt > /dev/null" &
ssh magneto "~/trabalho-2/bin/client x-men client_magneto_${comand}.out < ~/trabalho-2/input/magneto_${comand}.txt > /dev/null" &
ssh hulk "~/trabalho-2/bin/client x-men client_hulk_${comand}.out < ~/trabalho-2/input/hulk_${comand}.txt > /dev/null"  &
ssh colossus "~/trabalho-2/bin/client x-men client_colossus_${comand}.out < ~/trabalho-2/input/colossus_${comand}.txt > /dev/null" &
ssh tempestade "~/trabalho-2/bin/client x-men client_tempestade_${comand}.out < ~/trabalho-2/input/tempestade_${comand}.txt > /dev/null" &
ssh demolidor "~/trabalho-2/bin/client x-men client_demolidor_${comand}.out < ~/trabalho-2/input/demolidor_${comand}.txt > /dev/null" &
#ssh venon "~/trabalho-2/bin/client x-men client_venon_${comand}.out < ~/trabalho-2/input/venon_${comand}.txt > /dev/null" &
ssh vampira "~/trabalho-2/bin/client x-men client_vampira_${comand}.out < ~/trabalho-2/input/vampira_${comand}.txt > /dev/null" &
ssh gambit "~/trabalho-2/bin/client x-men client_gambit_${comand}.out < ~/trabalho-2/input/gambit_${comand}.txt > /dev/null" &
ssh elektra "~/trabalho-2/bin/client x-men client_elektra_${comand}.out < ~/trabalho-2/input/elektra_${comand}.txt > /dev/null" &
ssh anjo "~/trabalho-2/bin/client x-men client_anjo_${comand}.out < ~/trabalho-2/input/anjo_${comand}.txt > /dev/null" &
ssh justiceiro "~/trabalho-2/bin/client x-men client_justiceiro_${comand}.out < ~/trabalho-2/input/justiceiro_${comand}.txt > /dev/null" &
ssh noturno "~/trabalho-2/bin/client x-men client_noturno_${comand}.out < ~/trabalho-2/input/noturno_${comand}.txt > /dev/null" &
wait
